package cn.itcast.bos.system.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.itcast.bos.domain.security.Permission;
import cn.itcast.bos.system.dao.PermissionDao;
import cn.itcast.bos.system.service.PermissionService;

@Service
@Transactional
public class PermissionServiceImpl implements PermissionService{

	@Autowired
	private PermissionDao permissiondao;
	@Override
	public List<Permission> getPermissionByUserId(int id) {
		// TODO Auto-generated method stub
		return permissiondao.getPermissionByUserId(id);
	}
	@Override
	public List<Permission> show() {
		// TODO Auto-generated method stub
		return permissiondao.findAll();
	}
	@Override
	public void show(Permission t) {
		// TODO Auto-generated method stub
		permissiondao.save(t);
	}

}
